﻿using System;

namespace GameViewModel
{
    public class Player : Person
    {
        private int _playerScore;

        public int PlayerScore
        {
            get { return _playerScore; }
            set
            {
                if (value == _playerScore) return;
                _playerScore = value;
                OnPropertyChanged();
            }
        }

        public Player(string name, int order)
            : base(name, order)
        {
            Order = order;
        }

        public int Order { get; private set; }
        public override string Name { get { return base.Name; } set { } }
        public override bool IsSelected { get { return true; } set { } }

        public void Plus(int value)
        {
            PlayerScore += value;
        }

        public void Minus(int unit)
        {
            PlayerScore -= unit;
        }

        public void Penalty(int unit)
        {
            PlayerScore -= unit;
        }

    }
}